package com.aierjun.test.utils;

import android.content.Context;
import android.content.SharedPreferences;

/**
 * Created by aierJun on 2016/12/13.
 */
public class SharedPreferencesUtils {
    /*存储用户名密码，以及返回的参数*/
    public static void save(Context context,int to,String string){
        SharedPreferences sharedPreferences=context.getSharedPreferences(string,0);
        sharedPreferences.edit().putInt("TO",to).commit();
    }
    /*获取用户名密码，token*/
    public static int getToken(Context context,String string){
        SharedPreferences sharedPreferences=context.getSharedPreferences(string,0);
        int toget=sharedPreferences.getInt("TO",100);
        return toget;
    }
}
